package com.yeyks;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.Date;
import java.util.TimeZone;

/**
 * @program: admin
 * @description:
 * @author: chenzheng
 * @create: 2019-11-04 10:11
 **/
@MapperScan("com.yeyks.**.dao")
@SpringBootApplication
@EnableScheduling
public class YyksOpenScheduleTaskApplication {

    private static Logger LOGGER = LoggerFactory.getLogger(YyksOpenScheduleTaskApplication.class);

    public static void main(String[] args) {

        //时区设置，避免服务以后放到docker容器中有时差问题
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
        LOGGER.info("system time:[{}]", new Date().toString());
        LOGGER.info("timezone:[{}]", System.getProperty("user.timezone"));
        SpringApplication.run(YyksOpenScheduleTaskApplication.class, args);
        LOGGER.info("定时任务应用系统运行成功" + new Date());
    }

}
